﻿<classes:MSHPhoneApplicationPage xmlns:my="clr-namespace:Microsoft.Phone.Controls.Maps;assembly=Microsoft.Phone.Controls.Maps"  
    x:Class="WP7Client.UserInterface.Pages.FriendNotificationPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone" 
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:cmd="clr-namespace:GalaSoft.MvvmLight.Command;assembly=GalaSoft.MvvmLight.WP7"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait" Orientation="Portrait"
    mc:Ignorable="d" d:DesignHeight="768" d:DesignWidth="480" Loaded="MSHPhoneApplicationPage_Loaded"
    shell:SystemTray.IsVisible="True" x:Name="theNotificationPage"
    xmlns:classes="clr-namespace:WP7Client.Classes">

    <classes:MSHPhoneApplicationPage.Resources>
        <ControlTemplate x:Key="pushPinTemplate">
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <Ellipse Fill="Red" Grid.Row="0" Width="25" Height="25" Margin="-12"/>
                <Ellipse Fill="Black" Grid.Row="0" Width="10" Height="10" Margin="-12"/>               
            </Grid>
        </ControlTemplate>
    </classes:MSHPhoneApplicationPage.Resources>

    <Grid x:Name="LayoutRoot" Background="Transparent" >
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <TextBlock x:Name="PageTitle" Grid.Row="0" Text="Notification" Margin="5" Style="{StaticResource PhoneTextTitle1Style}"/>
   
        <Grid x:Name="ContentPanel" Grid.Row="1">
            
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition Height="*" />
                <RowDefinition Height="Auto" />
            </Grid.RowDefinitions>
           
            <TextBlock Margin="5" Grid.Row="0" Text="{Binding Notification.FriendUsername}" Foreground="White" FontSize="35"/>

            <my:Map Name="theMap" Grid.Row="1" LogoVisibility="Collapsed" CopyrightVisibility="Collapsed" ZoomBarVisibility="Visible"
                    MouseLeftButtonDown="theMap_MouseLeftButtonDown"/>

            <StackPanel Grid.Row="2" Orientation="Horizontal">
                <Button Content="Save" cmd:ButtonBaseExtensions.Command="{Binding SaveNotificationCommand}"/>
                <TextBlock Text="Range: " VerticalAlignment="Center" FontSize="30"/>
                <TextBox Name="RangTextBox" Width="200" Text="{Binding Notification.Range, Mode=TwoWay}" TextChanged="TextBox_TextChanged" />
                <TextBlock Margin="-10,0,0,0" Text="Km" VerticalAlignment="Center" FontSize="30"/>
            </StackPanel>

        </Grid>
    </Grid>

</classes:MSHPhoneApplicationPage>
